<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:myta="http://java.sun.com/jsf/composite/myta">
      
	<h:head>
		<title>SIA Siswa Panel</title>
		<link rel="stylesheet" type="text/css" href="../resources/css/bootstrap.css"/>
		<link rel="stylesheet" type="text/css" href="../resources/css/bootstrap.datatable.css"/>

		<script type="text/javascript" language="javascript" src="../resources/js/jquery.min.js"></script>
		<script type="text/javascript" language="javascript" src="../resources/js/bootstrap.js"></script>
		<script type="text/javascript" language="javascript" src="../resources/js/jquery.dataTables.min.js"></script>
		<script type="text/javascript" language="javascript" src="../resources/js/boostrap.datatable.js"></script>
		<script type="text/javascript" language="javascript" src="../resources/js/style.js"></script>
	</h:head>

	<h:body>
		<div class="container">
			<div class="row">
				<div class="navbar navbar-inverse navbar-fixed-top">
          			<div class="container">
            			<div class="navbar-header">
              				<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
				                <span class="sr-only">Toggle navigation</span>
				                <span class="icon-bar"></span>
				                <span class="icon-bar"></span>
				                <span class="icon-bar"></span>
              				</button>
              				<a class="navbar-brand" href="#">
              					<i class="glyphicon glyphicon-flag"/>
								<span><b>SIA</b> siswa panel</span>
              				</a>
            			</div>
            			
            			<div class="navbar-collapse collapse">
              				<ul class="nav navbar-nav">
                				<li class="dropdown">
                  					<a href="#" class="dropdown-toggle" data-toggle="dropdown">Data Siswa <b class="caret"></b></a>
                  					<ul class="dropdown-menu">
                  						<li><a href="absensi.jsf">Data Absensi</a></li>
                  						<li><a href="nilai.jsf">Data Nilai</a></li>
                  						<li><a href="rapot.jsf">Data Raport</a></li>
                  						<li><a href="analisa.jsf">Analisa Nilai</a></li>
                  					</ul>
                				</li>
              				</ul>
              				
              				<div class="pull-right" style="margin-top: 7px;"><h:outputLink rendered="#{sessionSiswa.login}" value="logout.jsf?id=#{sessionSiswa.nis}" styleClass="btn btn-danger" onclick="if(!confirm('Anda yakin ingin logout session ini?'))return false;"><i class="glyphicon glyphicon-user"/> logout</h:outputLink> </div>
              				<div class="pull-right" style="margin-top: 15px;"><h:outputLink rendered="#{sessionSiswa.login}" value="#" >login as #{sessionSiswa.nama} <h:outputLabel value="  " /></h:outputLink></div>
            			</div>
          			</div>
        		</div>
			</div>
		</div>
		
		<div class="container">
			<div class="row">
				<br/><br/><br/>
				<div class="col-sm-12 col-md-12 col-lg-12">	
					<div class="panel panel-default">
							<div class="panel-body">
								<div class="page-header"><h1>Data Rapot</h1></div>
								<h:form id="data" onkeypress="if(event.keyCode==13)return false;">
									<div class="panel panel-primary">
										<div class="panel-heading">Filter Data Laporan</div>
										<div class="panel-body">
											<div class="form-horizontal">
												<div class="form-group">
													<label for="thnajaran" class="col-sm-2 control-label">Tahun Ajaran</label>
													<div class="col-sm-10">
														<h:inputText id="thnajaran" binding="#{rapotSiswa.txtthnajaran}" styleClass="form-control"/>
													</div>
												</div>
												<div class="pull-right">
													<h:commandButton value="Proses Laporan" action="#{rapotSiswa.proses()}" styleClass="btn btn-success">
														<f:ajax execute="thnajaran" render="datatable"/>
													</h:commandButton>
												</div>
											</div>
										</div>
									</div>
									<div class="panel panel-primary">
										<div class="panel-heading">Data Laporan Rapot</div>
										<div class="panel-body">
											<h:dataTable id="datatable" value="#{rapotSiswa.datatable.dataRows}" var="var" styleClass="table table-bordered table-striped">
												<h:column>
													<f:facet name="header">Thn. Ajaran</f:facet>
													#{var[0]}
												</h:column>
												<h:column>
													<f:facet name="header">Kelas</f:facet>
													#{var[1]}
												</h:column>
												<h:column>
													<f:facet name="header">Nama Siswa</f:facet>
													#{var[3]}
												</h:column>
												<h:column>
													<f:facet name="header">Mata Pelajaran</f:facet>
													#{var[4]}
												</h:column>
												<h:column>
													<f:facet name="header">Nilai KD</f:facet>
													#{var[5]}
												</h:column>
												<h:column>
													<f:facet name="header">UTS</f:facet>
													#{var[6]}
												</h:column>
												<h:column>
													<f:facet name="header">UAS</f:facet>
													#{var[7]}
												</h:column>
												<h:column>
													<f:facet name="header">Nilai Rapot</f:facet>
													#{var[8]}
												</h:column>
											</h:dataTable>
										</div>
									</div>
								</h:form>
							</div>
						</div>
				</div>
			</div>
		</div>
	</h:body>
		
</html>